package com.test.springboot.springboot3testdemo3.controller;

import com.test.springboot.springboot3testdemo3.convertor.UserMapper;
import com.test.springboot.springboot3testdemo3.dto.UserDTO;
import com.test.springboot.springboot3testdemo3.entity.UserEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2024/9/14-14:53
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@RestController
public class UserController {
  @GetMapping("getUserInfo")
  public UserDTO getUser() {
    UserEntity entity = new UserEntity(1L, "liuziyang", "liuziyang@gmail.com", true);
    return UserMapper.INSTANCE.convertToDTO(entity);
  }
}
